High Efficiency Video Coding (HEVC) is a new coding standard that has been developed in recent years. In the High Efficiency Video Coding (HEVC) system, the fixed-size macroblock of H.264/AVC is replaced by a flexible block, named coding unit (CU). Pixels in the CU share the same coding parameters to improve coding efficiency. A CU may begin with a largest CU (LCU), which is also referred as coded tree unit (CTU) in HEVC. In addition to the concept of coding unit, the concept of prediction unit (PU) is also introduced in HEVC. Once the splitting of CU hierarchical tree is done, each leaf CU is further split into one or more prediction units (PUs) according to prediction type and PU partition. Several coding tools for screen content coding have been developed. These tools related to the present invention are briefly reviewed as follow.
Palette Coding
During the development of HEVC screen content coding (SCC), several proposals have been disclosed to address palette-based coding. For example, a palette prediction and sharing technique is disclosed in JCTVC-N0247 (Guo et al., “RCE3: Results of Test 3.1 on Palette Mode for Screen Content Coding”, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 14th Meeting: Vienna, AT, 25 Jul.-2 Aug. 2013 Document: JCTVC-N0247) and JCTVC-O0218 (Guo et al., “Evaluation of Palette Mode Coding on HM-12.0+RExt-4.1”, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 15th Meeting: Geneva, CH, 23 Oct.-1 Nov. 2013, Document: JCTVC-O0218). In JCTVC-N0247 and JCTVC-O0218, the palette of each color component is constructed and transmitted. The palette can be predicted (or shared) from its left neighboring CU to reduce the bitrate. All pixels within the given block are then coded using their palette indices. An example of encoding process according to JCTVC-N0247 is shown as follows.
Transmission of the palette: the color index table (also called palette table) size is first transmitted followed by the palette elements (i.e., color values).
Transmission of pixel palette index values (indices pointing to the colors in the palette): the index values for the pixels in the CU are encoded in a raster scan order. For each position, a flag is first transmitted to indicate whether the “run mode” or “copy above run mode” is being used.                a. “Run mode”: In “run mode”, a palette index is first signaled followed by “palette_run” (e.g., M). No further information needs to be transmitted for the current position and the following M positions as they have the same palette index as signaled. The palette index (e.g., i) is shared by all three color components, which means that the reconstructed pixel values are (Y, U, V)=(paletteY[i], paletteU[i], paletteV[i]) (assuming the color space is YUV).        b. “Copy-above run mode”: In “copy above run mode”, a value “copy_run” (e.g., N) is transmitted to indicate that for the following N positions (including the current one), the palette indices are equal to the palette indices of the ones that are at the same positions in the row above.        
Transmission of residue: the palette indices transmitted in Stage 2 are converted back to pixel values and used as the prediction. Residue information is transmitted using HEVC residual coding and is added to the prediction for the reconstruction.
In JCTVC-N0247, palette of each component is constructed and transmitted. The palette can be predicted (or shared) from its left neighboring CU to reduce the bitrate. In JCTVC-O0218, each element in the palette is a triplet, representing a specific combination of the three color components. The predictive coding of palette across CU is removed.
In JCTVC-O0182 (Guo et al., “AHG8. Major-color-based screen content coding”, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 15th Meeting: Geneva, CH, 23 Oct.-1 Nov. 2013, Document: JCTVC-O0182), another palette coding method is disclosed. Instead of predicting the entire palette table from the left CU, individual palette color entry in a palette can be predicted from the exact corresponding palette color entry in the above CU or left CU.
For transmission of pixel palette index values, a predictive coding method is applied on the indices according to JCTVC-00182. An index line can be predicted by different modes. In specific, three kinds of line modes are used for an index line, i.e. horizontal mode, vertical mode and normal mode. In horizontal mode, all indices in the same line have the same value. If the value is the same as the first pixel of the above pixel line, only line mode signaling bits are transmitted. Otherwise, the index value is also transmitted. In vertical mode, the current index line is the same with the above index line. Therefore, only line mode signaling bits are transmitted. In normal mode, indices in a line are predicted individually. For each index position, the left or above neighbor is used as predictor, and the prediction symbol is transmitted to the decoder.
Furthermore, according to JCTVC-O0182, pixels are classified into major color pixels (with palette indices pointing to the palette colors) and escape pixel. For major color pixels, the decoder reconstructs the pixel value according to the major color index (I.e., palette index in JCTVC-N0247 and JCTVC-00182) and palette table. For escape pixel, the encoder will further send the pixel value.
Signaling of Palette Table
In the reference software of Screen Content Coding (SCC) standard, SCM-2.0 (JCTVC-R1014: Joshi, et al., Screen content coding test model 2 (SCM 2), Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 18th Meeting: Sapporo, JP, 30 Jun.-9 Jul. 2014, Document: JCTVC-R1014), the palette table of last coded palette CU is used as a predictor for the current palette table coding. In palette table coding, a palette_share_flag is first signaled. If palette_share_flag is 1, all the palette colors in the last coded palette table are reused for the current CU. The current palette size is equal to the palette size of the last coded palette CU in this case. Otherwise (i.e., palette_share_flag is 0), the current palette table is signaled by indicating which palette colors in the last coded palette table can be reused, or by transmitting a new palette colors. The size of the current palette is set as the size of the predicted palette (i.e., numPredPreviousPalette) plus the size of the transmitted palette (i.e., num_signaled_palette_entries). The predicted palette is a palette derived from the previously reconstructed palette coded CUs. When coding the current CU as a palette mode, the palette colors are not predicted using the predicted palette are directly transmitted via the bitstream. For example, if current CU is coded as a palette mode with a palette size equal to six. If three of the six major colors are predicted from the palette predictor and three are directly transmitted through the bitstream. The following pseudo codes illustrate an example of transmitted three palette colors using the sample syntax mentioned above.
num_signaled_palette_entries = 3for( cIdx = 0; cIdx < 3; cIdx++ ) // signal colors for different componentsfor( i = 0; i < num_signaled_palette_entries; i++ )palette_entries[ cIdx ][ numPredPreviousPalette + i ]
Since the palette size is six in this example, the palette indices from 0 to 5 are used to indicate each palette coded pixel and each palette can be reconstructed as the major color in the palette color table.
In SCM-2.0, if the wavefront parallel processing (WPP) is not applied, the last coded palette table is initialized (i.e., reset) at the beginning of each slice or at the beginning of each tile. If the WPP is applied, the last coded palette table is not only initialized (reset) at the beginning of each slice or at the beginning of each tile, but also initialized (i.e., reset) at the beginning of each CTU row.
Palette Index Map Scan Order
In SCM-3.0 (JCTVC-S1014, Joshi, et al., “Screen content coding test model 3 (SCM 3)”, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 19th Meeting: Strasbourg, FR, 17-24 Oct. 2014, Document: JCTVC-S1014) palette mode coding, the traverse scan is used for index map coding as shown in FIG. 1. FIG. 1 illustrates an example of traverse scan for an 8×8 block. In traverse scan, the scan for the even rows is from left to right, and the scan for the odd rows is from right to left. The traverse scan is applied for all block sizes in palette mode.
Palette Index Map Coding in SCM-4.0
In SCM-4.0 (JCTVC-T1014: Joshi, et al., Screen content coding test model 4(SCM 4), Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 20th Meeting: Geneva, CH, 10-18 Feb. 2015, Document: JCTVC-T1014) palette mode coding, the palette indices are grouped and signaled in the front of the coded data for a corresponding block (i.e., before palette_run_mode and palette_run coding). On the other hand, the escape pixels are coded at the end of the coded data for the corresponding block. The syntax elements, palette_run_mode and palette_run are coded between palette indices and escape pixels. FIG. 2 illustrates an exemplary flowchart for index map syntax signaling according to SCM 4.0. The number of indices (210), last runtype flag (230) and grouped indices (220) are signaled. After signaling index information, a pair of run type (240) and number of runs (250) is repeatedly signalled. At last, a group of escape values (260) is signalled, if necessary.
Palette Predictor Initialization
In SCM-4.0, a global palette predictor set is signaled in PPS (picture parameter set). Instead of resetting all palette prediction states, including PredictorPaletteSize, PreviousPaletteSize and PredictorPaletteEntries, to 0, values obtained from the PPS are used instead.
Palette Syntax
For a run of indices in the index map, there are several elements that need to be signaled, including:                1) Run type: it is either a copy above run or a copy index run.        2) Palette index: it is used to signal which index is used for this run in a copy index run.        3) Run length: it represents the length of this run for both copy above and copy index type.        4) Escape pixel: if there are N (N>=1) escape pixels in the run, N pixel values need to be signaled for these N escape pixels.        
In JCTVC-T0064 (JCTVC-S1014: Joshi, et al., Screen content coding test model 4 (SCM 4), Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 20th Meeting: Geneva, CH, 10-18 Feb. 2015, Document: JCTVC-T1014), all the palette indices are grouped together. The number of palette indices is signaled first, followed by the palette indices.
According to existing HEVC specification, while palette indices for each color component are grouped together, most other palette coding related data for different color components are interleaved in the bitstream. Furthermore, individual memory space for storing an Inter/Intra coded block and storing a palette coded block. It is desired to develop techniques to improve system throughput and/or reduce system implementation cost.